package comoabejas

import java.util.List;

class User {
	String username
	String password
	String name
	String middleName
	String surname
	String email
	String address
	String phone
	List deals // if the user is trying to buy a deal but still has to wait until the end of the deal
	//List purchases //deals already finished and purchased by the user
	
	static hasMany = [purchases:Purchase]
	
    static constraints = {
		username(nullable:false)
		password(nullable:false, blank:false,  password:true)
		name(nullable:true)
		surname(nullable:true)
		email(email:true)
		address(nullable:true)
		phone(nullable:true)
		middleName(nullable:true)
    }
}
